function global() {
	var A = this;
	this.init = function() {
		A.loadStat();
		A.menuMore();
		A.cutover();
		return A
	};
	this.loadStat = function() {
		var B = $("#Stat_Parm");
		if (B.length > 0) {
			glb.ajax(glb.ajaxUrl + "loadtemplatesstat", "html", "parm=" + B.val(), null, function(G) {
				var D = G.split("|");
				var F = $(".fans>a>i");
				var E = $("#stat-show");
				for (var C = 0; C < D.length; C++) {
					if (C < 2) {
						F.eq(C).text(D[C])
					} else {
						if (D.length > 2) {
							E.find(".stat" + C + ">b").remove();
							E.find(".stat" + C).html(D[C])
						}
					}
				}
			}, null)
		}
	};
	this.menuMore = function() {
		var C = $(".menulist>.more");
		if (C.length > 0) {
			var B = C.find("ul");
			C.mouseover(function() {
				B.show()
			}).mouseout(function() {
				B.hide()
			})
		}
	};
	this.sendPM = function(C, B) {
		new pmform().getMsg(C, B)
	};
	this.Fans = function(C, D, B) {
		new fans().submit(C, D, B, function() {
			var E = $(B);
			E.attr("onclick", "_global.Fans(" + C + "," + (D == 0 ? 1 : 0) + ",this)");
			var F = $(".stat4").eq(0);
			if (F.length > 0) {
				F.text(parseInt(F.text()) + (D == 0 ? 1 : -1))
			}
		})
	};
	this.templates = function(C, B) {
		return new avatarbest().redirect(C, B)
	};
	this.cutover = function() {
		var B = $(".avatar>.cutoveravatar");
		if (B.length > 0) {
			var C = $(".avatar>img,.avatar>.cutoveravatar>em");
			C.css("cursor", "pointer").click(function() {
				location.href = "/uc/sets/avatar.html"
			});
			C.mouseover(function() {
				B.show()
			}).mouseout(function() {
				B.hide()
			})
		}
	}
}
var _yuyueserver = null;
$(function() {
	_yuyueserver = new yuyueserver().init()
});
